Rules of the Game

So now we can see how Agents affect the UrbanScape. FastFoodAgents and GroceryStoreAgents have the same incentive... to break even, make profits, and stay on the UrbanScape. If they go bankrupt, then they are removed from the grid.

Depending on the creation rule that we use, agents will start populating the UrbanScape and affecting the environment around it.


In [1]:
# Import UrbanScape again
import UrbanScape.urbanscape as us

# In order to animate the UrbanScape
from UrbanScape.animator import animate_urbanscape

In [2]:
# Create an UrbanScape 
# size = 20, rent = 100000, randomize = True
# set the create_rule to random_create_rule
my_urbanscape = us.UrbanScape(20, 100000, randomize = True, create_rule = us.random_create_rule)
animate_urbanscape(my_urbanscape)

In [ ]:
# Create an UrbanScape 
# size = 20, rent = 100000, randomize = True
# set the create_rule to random_create_rule
my_urbanscape = us.UrbanScape(20, 100000, randomize = True, create_rule = us.profit_probability_create_rule)
animate_urbanscape(my_urbanscape)